/*
 * Author: http://www.redwolf-soft.com
 * All Rights Reserved
 * 
 * 2013.11
 *   
 * */
package com.redwolfsoft.libshoppingserver.shoppingcenter;

import net.sf.json.JSONObject;


public class ShoppingCenterBrandInfo {
	public final static String TAG = "ShoppingCenterBrandInfo";
	
	public String id = null;//品牌id
	public String mDisplayName = null;	//品牌要在客户端显示的名称	
	public String address = null;
	
	public ShoppingCenterBrandInfo(String id, String name,String addr)
	{
		this.id=id;
		mDisplayName=name;
		this.address=addr;
	}
	
	public ShoppingCenterBrandInfo(JSONObject obj)
	{
		if(obj==null)
		{
			//Log.w(TAG, "JSONObject is null");
			return;
		}
		//try {		
			id = obj.getString("id");
			mDisplayName = obj.getString("mDisplayName");
			address = obj.getString("address");
			
			
		/*} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
	}
	
	public JSONObject toJsonObject()
	{
		JSONObject obj = new JSONObject();
		//JSONObject obj2 = new JSONObject();
		//try {
			obj.put("id", id);
			obj.put("mDisplayName", mDisplayName);
			obj.put("address", address);			
			
			//obj2.put(TAG, obj);
		/*} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}*/
		return obj;
		
	}
}
